<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>地图显示</title>
  <!-- 3.设置地图的样式 -->
   <style>
    html,
    body,
    #container {
      width: 100%;
      height: 100%;
    }
   </style>
</head>

<body>
  <!-- 2.创建地图容器 -->
   <div id="container"></div>
   <!-- 1.引入资源 -->
   <!-- 4.加载地图 -->
  <script type="text/javascript">
    window._AMapSecurityConfig = {
      securityJsCode: "62c0d051bb80ad16ee5f856e7f54b44e",
    };
  </script>
  <script src="https://webapi.amap.com/loader.js"></script>
  <script type="text/javascript">
    AMapLoader.load({
      key: "a329219cdacef71b0addbc88034c9b39", //申请好的Web端开发者 Key，调用 load 时必填
      version: "2.0", //指定要加载的 JS API 的版本，缺省时默认为 1.4.15
    })
      .then((AMap) => {
        const map = new AMap.Map("container");
      })
      .catch((e) => {
        console.error(e); //加载错误提示
      });
  </script>


</body>

</html>